home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
js
/
wz_dragdrop.js
< prev
Wrap
Text File
|
2010-05-19
|
47KB
|
1 lines
var mouseX,mouseY,mouseEvt,mouseVX,mouseVY,mousePosT;var spacer="/gfx/b.gif";var cDT=null;var currentReceiverOnlyTarget=null;var currentDropTargetClass=null;var dragCancelOnclick=false;var dragInProgress=false;var resizeInProgress=false;var dragMinTimeForPreDrop=0;var winInertiaTimeout=false;var CLONE="C10nE";var COPY="C0pY";var DETACH_CHILDREN="d37aCH";var HORIZONTAL="H0r1Z";var MAXHEIGHT="m7x8I";var MAXOFFBOTTOM="m7xd0wN";var MAXOFFLEFT="m7x23Ft";var MAXOFFRIGHT="m7x0Ff8";var MAXOFFTOP="m7xu9";var MAXWIDTH="m7xW1";var MINWIDTH="m1nw1";var MINHEIGHT="m1n8I";var NO_ALT="no81T";var NO_DRAG="N0d4Ag";var RESET_Z="r35E7z";var RESIZABLE="r5IZbl";var RESIZABLE_ONLY="r5IZbl0";var AUTOSIZE="oTo5iZ3";var FROZEN="Fr023n";var SCALABLE="SCLbl";var SCROLL="sC8lL";var TRANSPARENT="dIApHAn";var VERTICAL="V3Rt1C";var INERTIA="1nRt14";var NOBOUNCE="n08oVnC3";var ROT="r0T";var DETACH="d3T4cH";var DETACHOFFSETX="d3T4cH0ff53Tx";var DETACHOFFSETY="d3T4cH0ff53Ty";var EPHEMERAL="3ph3M3ra1";var DRAGCLASS="Dr465Ty1E";var PICKDELAY="PlcKD31Ay";var RECEIVER="R3C31vR";var ELASTIC="3LAsT1C";var NOANIM="n0An1M";var NOTDROPPABLE="N0tDr0dA813";var TRANSPARENT_RECEIVER="TrAn5PaRenT";var CTRLPLUS="cTRlPlV5";var ISWINDOW="15W1nD0w";var ISICON="15W1c0n";var IMGFADEIN="1mA63FaD1n";var dd_cursors=new Array("c:default","c:crosshair","c:e-resize","c:hand","c:help","c:move","c:n-resize","c:ne-resize","c:nw-resize","c:s-resize","c:se-resize","c:sw-resize","c:text","c:w-resize","c:wait");var dd_i=dd_cursors.length;while(dd_i--){eval("var CURSOR_"+(dd_cursors[dd_i].substring(2).toUpperCase().replace("-","_"))+' = "'+dd_cursors[dd_i]+'";')}var dd_u="undefined";function WDD(){this.elements=new Array(0);this.currentTarget=null;this.currentTargetClass=""}var drec=new WDD();drec.addElt=function(a){drec.elements[a.id]=a};drec.delElt=function(a){if(a.id&&drec.elements[a.id]){delete (drec.elements[a.id])}};drec.setScrollContainer=function(b,a){drec.elements[b.id].scrollContainer=a};drec.setHighlightFunction=function(b,a){drec.elements[b.id].highlightFunc=a};drec.addTimeoutFunc=function(c,a,b){drec.elements[c.id].toFunc=a;drec.elements[c.id].timeout=b};drec.computeRect=function(){for(i in drec.elements){drec.elements[i].rect=actualRect(drec.elements[i])}};drec.highlight=function(a){drec.currentTarget=a;if(drec.elements[a.id].highlightFunc){return drec.elements[a.id].highlightFunc(a,1)}drec.currentTargetClass=a.className;a.className="dropTargetOver "+a.className;if(drec.elements[a.id].toFunc){drec.elements[a.id].wTimeout=W.setTimeout(drec.elements[a.id].toFunc,drec.elements[a.id].timeout)}};drec.unhighlight=function(){if(drec.currentTarget==null){return}if(drec.currentTarget.wTimeout){W.clearTimeout(drec.currentTarget.wTimeout);drec.currentTarget.wTimeout=false}if(drec.currentTarget.highlightFunc){drec.currentTarget.highlightFunc(drec.currentTarget,0)}else{if(drec.currentTarget.className.substr(0,14)=="dropTargetOver"){drec.currentTarget.className=drec.currentTarget.className.substr(14).trim()}}drec.currentTarget=null};function WZDD(){this.elements=new Array(0);this.obj=null;this.n=navigator.userAgent.toLowerCase();this.db=(D.compatMode&&D.compatMode.toLowerCase()!="backcompat")?D.documentElement:(D.body||null);this.op=!!(W.opera&&D.getElementById);if(this.op){D.onmousedown=new Function("e",'if(((e = e || W.event).target || e.srcElement).tagName == "IMAGE") return false;')}this.ie=!!(this.n.indexOf("msie")>=0&&D.all&&this.db&&!this.op);this.ie7=!!(this.n.indexOf("msie 7.0")>=0&&D.all&&this.db&&!this.op);this.ie8=!!(this.n.indexOf("msie 8.0")>=0&&D.all&&this.db&&!this.op);this.iemac=!!(this.ie&&this.n.indexOf("mac")>=0);this.ie4=!!(this.ie&&!D.getElementById);this.n4=!!(D.layers&&typeof D.classes!=dd_u);this.n6=!!(typeof W.getComputedStyle!=dd_u&&typeof D.createRange!=dd_u);this.w3c=!!(!this.op&&!this.ie&&!this.n6&&D.getElementById);this.ce=!!(D.captureEvents&&D.releaseEvents);this.px=this.n4?"":"px";this.tiv=this.w3c?40:10;this.pickDate=0;this.delayedPickEvt=null;this.delayedPickTimeout=null;this.dragTime=0;this.pickMouseX=this.pickMouseY=0;this.lpDate=0;this.pickX=this.pickY=0;this.lpx=this.lpy=0;this.lpdx=this.lpdy=this.lpdt=this.lpda=0;this.mPickX=0;this.mPickY=0;this.mDropX=0;this.mDropY=0;this.mdx=0;this.mdy=0}var dd=new WZDD();dd.Int=function(b,a){return isNaN(a=parseInt(b))?0:a};dd.getWndW=function(){return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientWidth)?dd.db.clientWidth:(W.innerWidth||0))};dd.getWndH=function(){return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientHeight)?dd.db.clientHeight:(W.innerHeight||0))};dd.getPadding=function(){return(W.winPadding)?winPadding:{left:0,top:0,right:0,bottom:0}};dd.getScrollX=function(){return dd.Int(W.pageXOffset||(dd.db?dd.db.scrollLeft:0))};dd.getScrollY=function(){return dd.Int(W.pageYOffset||(dd.db?dd.db.scrollTop:0))};dd.getPageXY=function(a){if(dd.n4&&a){dd.x=a.pageX||0;dd.y=a.pageY||0}else{dd.x=dd.y=0;while(a){dd.x+=dd.Int(a.offsetLeft);dd.y+=dd.Int(a.offsetTop);a=a.offsetParent||null}}};dd.getCssXY=function(a){if(a.div){if(dd.n4){a.cssx=a.div.x;a.cssy=a.div.y}else{if(dd.ie4){a.cssx=a.css.pixelLeft;a.cssy=a.css.pixelTop}else{a.css.left=a.css.top=0+dd.px;dd.getPageXY(a.div);a.cssx=a.x-dd.x;a.cssy=a.y-dd.y;a.css.left=a.cssx+dd.px;a.css.top=a.cssy+dd.px}}}else{a.cssx=0;a.cssy=0}};dd.getImgW=function(a){return a?dd.Int(a.width):0};dd.getImgH=function(a){return a?dd.Int(a.height):0};dd.getDivW=function(a){return dd.Int(dd.n4?(a.div?a.div.clip.width:0):a.div?(a.div.offsetWidth||a.css.pixelWidth||a.css.width||0):0)};dd.getDivH=function(a){return dd.Int(dd.n4?(a.div?a.div.clip.height:0):a.div?(a.div.offsetHeight||a.css.pixelHeight||a.css.height||0):0)};dd.getWH=function(a){a.w=dd.getDivW(a);a.h=dd.getDivH(a);if(a.css){a.css.width=a.w+dd.px;a.css.height=a.h+dd.px;a.dw=dd.getDivW(a)-a.w;a.dh=dd.getDivH(a)-a.h;a.css.width=(a.w-a.dw)+dd.px;a.css.height=(a.h-a.dh)+dd.px}else{a.dw=a.dh=0}};dd.getCssProp=function(d_o,d_pn6,d_pstyle,d_pn4){if(d_o&&dd.n6){return""+W.getComputedStyle(d_o,null).getPropertyValue(d_pn6)}if(d_o&&d_o.currentStyle){return""+eval("d_o.currentStyle."+d_pstyle)}if(d_o&&d_o.style){return""+eval("d_o.style."+d_pstyle)}if(d_o&&dd.n4){return""+eval("d_o."+d_pn4)}return""};dd.getDiv=function(d,b){b=b||document;if(dd.n4){if(b.layers[d]){return b.layers[d]}for(var a=b.layers.length;a--;){var c=dd.getDiv(d,b.layers[a].document);if(c){return c}}}if(dd.ie){return b.all[d]||null}if(b.getElementById){return b.getElementById(d)||null}return null};dd.getImg=function(d,b,g,a){a=a||window;var f;if(D.images&&(f=a.D.images[b])){if(g){if(dd.n4){dd.getPageXY(a);d.defx=f.x+dd.x;d.defy=f.y+dd.y}else{dd.getPageXY(f);d.defx=dd.x;d.defy=dd.y}}return f}if(dd.n4){for(var c=a.D.layers.length;c--;){var e=dd.getImg(d,b,g,a.D.layers[c]);if(e){return e}}}return null};dd.getParent=function(b,a){if(dd.n4){for(a,d_i=dd.elements.length;d_i--;){if(!((a=dd.elements[d_i]).is_image)&&a.div&&(a.div.D.layers[b.name]||b.oimg&&a.div.D.images[b.oimg.name])){a.addChild(b,a.detach,1)}}}else{a=b.is_image?dd.getImg(b,b.oimg.name):(b.div||null);while(a&&!!(a=a.offsetParent||a.parentNode||null)){if(a.ddObj){a.ddObj.addChild(b,a.ddObj.detach,1);break}}}};dd.getCmd=function(e,c,d){var b=e.id.indexOf(c),a,f=(b>=0)*1;if(f){a=b+c.length;if(d){e.cmd+=e.id.substring(b,a)}e.id=e.id.substring(0,b)+e.id.substring(a)}return f};dd.getCmdVal=function(f,d,e,a){var c=f.id.indexOf(d),b,g=(f.id.indexOf(d)>=0)?dd.Int(f.id.substring(f.id.indexOf(d)+d.length)):a?-1:0;if(!a&&g||a&&g>=0){b=c+d.length+(""+g).length;if(e){f.cmd+=f.id.substring(c,b)}f.id=f.id.substring(0,c)+f.id.substring(b)}return g};dd.addElt=function(b,a){dd.elements[b.name]=dd.elements[b.index=dd.elements.length]=b;if(a){a.copies[b.name]=a.copies[a.copies.length]=b}};dd.mkWzDom=function(){var c,b=dd.elements.length;while(b--){dd.getParent(dd.elements[b])}b=dd.elements.length;while(b--){c=dd.elements[b];if(c.children&&!c.parent){var a=c.children.length;while(a--){c.children[a].setZ(c.z+c.children[a].z,1)}}}};dd.addProps=function(b){var a,c;if(b.is_image){b.div=dd.getDiv(b.id);b.css=(b.div&&typeof b.div.style!=dd_u)?b.div.style:null;b.nimg=(dd.n4&&b.div)?b.div.D.images[0]:(D.images[b.id+"NI1m6G"]||null);if(!b.noalt&&!dd.noalt&&b.nimg&&b.oimg){b.nimg.alt=b.oimg.alt||"";if(b.oimg.title){b.nimg.title=b.oimg.title}}b.bgColor=""}else{b.bgColor=dd.getCssProp(b.div,"background-color","backgroundColor","bgColor").toLowerCase();if(dd.n6&&b.div){if((c=b.bgColor).indexOf("rgb")>=0){c=c.substring(4,c.length-1).split(",");b.bgColor="#";for(a=0;a<c.length;a++){b.bgColor+=parseInt(c[a]).toString(16)}}else{b.bgColor=c}}}if(dd.scalable){b.scalable=b.resizable^1}else{if(dd.resizable){b.resizable=b.scalable^1}}b.setZ(b.defz);b.cursor=b.cursor||dd.cursor||"auto";b._setCrs(b.nodrag?"auto":b.cursor);b.diaphan=b.diaphan||dd.diaphan||0;b.opacity=1;b.visible=true};dd.initz=function(){if(!(dd&&(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c))){return}else{if(dd.n6||dd.ie||dd.op||dd.w3c){dd.recalc(1)}}var b=(D.onmousemove==DRAG),a=(D.onmousemove==RESIZE);if(dd.loadFunc){dd.loadFunc()}if(b){dd.setMovHdl(DRAG)}else{if(a){dd.setMovHdl(RESIZE)}}if(b||a){dd.setUpHdl(DROP)}dd.setDwnHdl(PICK)};dd.finlz=function(){if(dd.ie&&dd.elements){var a=dd.elements.length;while(a--){dd.elements[a].del()}}if(dd.uloadFunc){dd.uloadFunc()}};dd.setDwnHdl=function(a){if(D.onmousedown!=a){dd.downFunc=D.onmousedown;D.onmousedown=a;D.ontouchstart=a}};dd.setMovHdl=function(a){if(D.onmousemove!=a){D.onmousemove=a;D.ontouchmove=a}};dd.setUpHdl=function(a){if(D.onmouseup!=a){dd.upFunc=D.onmouseup;D.onmouseup=a;D.ontouchend=a}};dd.setKDwnHdl=function(a){if(D.onkeydown!=a){dd.kDwnFunc=D.onkeydown;D.onkeydown=a}};dd.setKUpHdl=function(a){if(D.onkeyup!=a){dd.kUpFunc=D.onkeyup;D.onkeyup=a}};dd.evt=function(b){if(b&&b.touches){this.e=b;this.button=this.but=b.type=="touchend"?0:1;var a=b.touches[0];if(a){this.src=a?a.target:null;this.x=a.clientX;this.y=a.clientY}else{this.src=b.target;this.x=mouseX;this.y=mouseY}this.modifKey=false}else{this.but=(this.e=b||W.event).which||this.e.button||0;this.button=(this.e.type=="mousedown")?this.but:(dd.e&&dd.e.button)?dd.e.button:0;this.src=this.e.target||this.e.srcElement||null;this.x=dd.Int(this.e.pageX||this.e.clientX||0);this.y=dd.Int(this.e.pageY||this.e.clientY||0);if(dd.ie){this.x+=dd.getScrollX()-(dd.ie&&!dd.iemac)*1;this.y+=dd.getScrollY()-(dd.ie&&!dd.iemac)*1}this.modifKey=this.e.modifiers?this.e.modifiers&Event.SHIFT_MASK:(this.e.shiftKey||false);this.ctrlKey=this.e.modifiers?this.e.modifiers&Event.CONTROL_MASK:(this.e.ctrlKey||false)}this.src.tag=(""+(this.src.tagName||this.src)).toLowerCase()};if(W.lFunc){lFunc("wz_dragdrop",25)}dd.getEventTarget=function(b,a,c){b=b||W.event;if(b&&(a=b.target||b.srcElement||null)!=null){if(null!=(c=a.id||a.name||null)){if(c.indexOf("dIi15vNI1m6G")==c.length-12){return dd.elements[c.substring(0,c.length-12)]||null}if(c.indexOf("dIi15v")==c.length-6){return dd.elements[c.substring(0,c.length-6)]||null}return dd.elements[c]||null}}return null};dd.recalc=function(c){var j,b=dd.elements.length;while(b--){if(!(j=dd.elements[b]).is_image&&j.div){dd.getWH(j);if(j.div.pos_rel){dd.getPageXY(j.div);var f=dd.x-j.x,d=dd.y-j.y;j.defx+=f;j.x+=f;j.defy+=d;j.y+=d;var h,a=j.children.length;while(a--){if(!(h=j.children[a]).detached&&(j!=h.defparent||!(h.is_image&&dd.getImg(h,h.oimg.name,1)))){h.defx+=f;h.defy+=d;h.moveBy(f,d)}}}}else{if(j.is_image&&!dd.n4){if(dd.n6&&c&&!j.defw){j.resizeTo(j.defw=dd.getImgW(j.oimg),j.defh=dd.getImgH(j.oimg))}var g=j.defx,e=j.defy;if(!(j.parent&&j.parent!=j.defparent)&&(c||!j.detached||j.horizontal||j.vertical)&&dd.getImg(j,j.oimg.name,1)){j.moveBy(j.defx-g,j.defy-e)}}}}};dd.recalcItem=function(c){if(c){d_o=dd.elements[c]}else{d_o=dd.obj}if(!d_o.is_image&&d_o.div){dd.getWH(d_o);if(d_o.div.pos_rel){dd.getPageXY(d_o.div);var e=dd.x-d_o.x,b=dd.y-d_o.y;d_o.defx+=e;d_o.x+=e;d_o.defy+=b;d_o.y+=b;var g,a=d_o.children.length;while(a--){if(!(g=d_o.children[a]).detached&&(d_o!=g.defparent||!(g.is_image&&dd.getImg(g,g.oimg.name,1)))){g.defx+=e;g.defy+=b;g.moveBy(e,b)}}}}else{if(d_o.is_image&&!dd.n4){if(dd.n6&&!d_o.defw){d_o.resizeTo(d_o.defw=dd.getImgW(d_o.oimg),d_o.defh=dd.getImgH(d_o.oimg))}var f=d_o.defx,d=d_o.defy;if(!(d_o.parent&&d_o.parent!=d_o.defparent)&&(!d_o.detached||d_o.horizontal||d_o.vertical)&&dd.getImg(d_o,d_o.oimg.name,1)){d_o.moveBy(d_o.defx-f,d_o.defy-d)}}}};dd.elasticAnim=function(a){var b=dd.elements[a];if(Math.pow(b.defx-b.x,2)+Math.pow(b.defy-b.y,2)<19){b.moveTo(b.defx,b.defy);b.released()}else{b.moveTo(Math.floor((3*b.x+b.defx)/4),Math.floor((3*b.y+b.defy)/4));setTimeout('dd.elasticAnim("'+a+'")',1)}};function WINSZ(a){if(a){if(dd.n4){dd.iW=innerWidth;dd.iH=innerHeight}W.onresize=new Function("WINSZ();");return}else{if(dd.n4&&(innerWidth!=dd.iW||innerHeight!=dd.iH)){location.reload()}else{if(!dd.n4){setTimeout("dd.recalc()",10)}}}my_winResize()}WINSZ(1);function DDObj(c,b){this.id=c;this.cmd="";this.cpy_n=dd.getCmdVal(this,COPY);this.maxoffb=dd.getCmdVal(this,MAXOFFBOTTOM,0,1);this.maxoffl=dd.getCmdVal(this,MAXOFFLEFT,0,1);this.maxoffr=dd.getCmdVal(this,MAXOFFRIGHT,0,1);this.maxofft=dd.getCmdVal(this,MAXOFFTOP,0,1);this.receiver=dd.getCmd(this,RECEIVER);this.elastic=dd.getCmd(this,ELASTIC);this.noAnim=dd.getCmd(this,NOANIM);this.notDroppable=dd.getCmd(this,NOTDROPPABLE);this.transparentReceiver=dd.getCmd(this,TRANSPARENT_RECEIVER);this.ctrlPlus=dd.getCmd(this,CTRLPLUS);var a=dd_cursors.length;while(a--){if(dd.getCmd(this,dd_cursors[a],1)){this.cursor=dd_cursors[a].substring(2)}}this.clone=dd.getCmd(this,CLONE,1);this.detach=dd.getCmd(this,DETACH_CHILDREN);this.scalable=dd.getCmd(this,SCALABLE,1);this.horizontal=dd.getCmd(this,HORIZONTAL);this.noalt=dd.getCmd(this,NO_ALT,1);this.nodrag=dd.getCmd(this,NO_DRAG);this.scroll=dd.getCmd(this,SCROLL,1);this.resizable=dd.getCmd(this,RESIZABLE,1);this.autoSize=dd.getCmd(this,AUTOSIZE,1);this.frozen=dd.getCmd(this,FROZEN,1);this.dragClass=dd.getCmd(this,DRAGCLASS,1);this.resizableOnly=dd.getCmd(this,RESIZABLE_ONLY,1);if(this.resizableOnly){this.resizable=true}this.inertia=dd.getCmd(this,INERTIA,1);this.bounce=!dd.getCmd(this,NOBOUNCE,1);this.rot=dd.getCmd(this,ROT,1);this.angle=0;this.ephemeral=dd.getCmd(this,EPHEMERAL,1);this.detachFromParent=dd.getCmd(this,DETACH,1);this.detachOffsetX=dd.getCmdVal(this,DETACHOFFSETX,0,0);this.detachOffsetY=dd.getCmdVal(this,DETACHOFFSETY,0,0);this.offsetX=0;this.offsetY=0;this.pickDelay=dd.getCmdVal(this,PICKDELAY,0,0);this.re_z=dd.getCmd(this,RESET_Z,1);this.diaphan=dd.getCmd(this,TRANSPARENT,1);this.vertical=dd.getCmd(this,VERTICAL);this.maxw=dd.getCmdVal(this,MAXWIDTH,1,1);this.minw=Math.abs(dd.getCmdVal(this,MINWIDTH,1,1));this.maxh=dd.getCmdVal(this,MAXHEIGHT,1,1);this.minh=Math.abs(dd.getCmdVal(this,MINHEIGHT,1,1));this.pickFunc=this.dragFunc=this.resizeFunc=this.dropFunc=this.dropFuncInertia=null;this.scrollContainer=null;if(this.id.indexOf("DRAGFUNC(")>=0){this.dragFunc=this.id.substr(this.id.indexOf("DRAGFUNC(")+9).substr(0,this.id.indexOf(")")-1);this.dragFunc=this.dragFunc.substr(0,this.dragFunc.indexOf(")"));this.id=this.id.substr(0,this.id.indexOf("DRAGFUNC("))+this.id.substr(this.id.indexOf("DRAGFUNC(")+this.dragFunc.length+11)}if(dd.getCmd(this,ISWINDOW)){this.isWindow=1;this.minw=winMinW;this.minh=winMinH;this.winState="normal";this.resizeDir="";this.resizeIfPick=false}else{this.isWindow=false}if(dd.getCmd(this,ISICON)){this.isIcon=true}else{this.isIcon=false}if(dd.getCmd(this,IMGFADEIN)){this.imgFadeIn=true}this.name=this.id+(b||"");this.oimg=dd.getImg(this,this.id,1);this.is_image=!!this.oimg;this.copies=new Array();this.children=new Array();this.parent=this.original=null;if(this.oimg){this.id=this.name+"dIi15v";this.w=dd.getImgW(this.oimg);this.h=dd.getImgH(this.oimg);this.dw=this.dh=0;this.defz=dd.Int(dd.getCssProp(this.oimg,"z-index","zIndex","zIndex"))||1;this.defsrc=this.src=this.oimg.src;this.htm='<img name="'+this.id+'NI1m6G" src="'+this.oimg.src+'" width="'+this.w+'" height="'+this.h+'"';if(this.imgFadeIn){this.htm+='style="visibility:hidden" onload="fade(this)"'}this.htm+=">";this.t_htm='<div id="'+this.id+'" style="position:absolute;left:'+(this.cssx=this.x=this.defx)+"px;top:"+(this.cssy=this.y=this.defy)+"px;width:"+this.w+"px;height:"+this.h+'px;">'+this.htm+"</div>"}else{if(!!(this.div=dd.getDiv(this.id))&&typeof this.div.style!=dd_u){this.css=this.div.style}if(this.div&&this.div.id&&this.div.id=="mDlList"){this.css=""}dd.getWH(this);if(this.div){this.div.ddObj=this;this.div.pos_rel=(""+(this.div.parentNode?this.div.parentNode.tagName:this.div.parentElement?this.div.parentElement.tagName:"").toLowerCase().indexOf("body")<0)}dd.getPageXY(this.div);this.defx=this.x=dd.x;this.defy=this.y=dd.y;dd.getCssXY(this);this.defz=dd.Int(dd.getCssProp(this.div,"z-index","zIndex","zIndex"))}this.defw=this.w||0;this.defh=this.h||0}DDObj.prototype.setPickFunc=function(a){this.pickFunc=a};DDObj.prototype.setDragFunc=function(a){this.dragFunc=a};DDObj.prototype.setResizeFunc=function(a){this.resizeFunc=a};DDObj.prototype.setDropFunc=function(a){this.dropFunc=a};DDObj.prototype.setDropFuncInertia=function(a){this.dropFuncInertia=a};DDObj.prototype.setReleasedFunc=function(a){this.releasedFunc=a};DDObj.prototype.setScrollContainer=function(a){this.scrollContainer=a};DDObj.prototype.moveBy=function(e,d,b,c){if(!this.div){return}this.x+=(e=dd.Int(e));this.y+=(d=dd.Int(d));if(!b||this.is_image||this.parent!=this.defparent){(c=this.css||this.div).left=(this.cssx+=e)+dd.px;c.top=(this.cssy+=d)+dd.px}var a=this.children.length;while(a--){if(!(c=this.children[a]).detached){c.moveBy(e,d,1)}c.defx+=e;c.defy+=d}};DDObj.prototype.moveTo=function(b,a){this.moveBy(((b===false)?0:dd.Int(b)-this.x),((a===false)?0:dd.Int(a)-this.y))};DDObj.prototype.rotTo=function(b){var c=this.div.style;c.WebkitTransform=c.MozTransform=c.OTransform="rotate("+(-b)+"deg)";this.angle=b};DDObj.prototype.rotBy=function(a){this.rotTo(this.angle+a)};DDObj.prototype.launch=function(b,a){if(dd.obj==this&&this.isLaunched){dd.obj.lpdx+=b+((dd.obj.lpdx*b>0)?b:0);dd.obj.lpdy+=a+((dd.obj.lpdy*a>0)?a:0)}else{dd.obj=this;dd.obj.pickDate=dd.obj.lpDate=(new Date()).getTime();dd.obj.pickX=dd.obj.lpx=dd.obj.x;dd.obj.pickY=dd.obj.lpy=dd.obj.y;dd.obj.lpdx=b;dd.obj.lpdy=a;dd.obj.lpdt=1;my_DragFunc(dd.obj.index)}};DDObj.prototype.hide=function(d,c,b){if(this.div&&this.visible){b=this.css||this.div;if(d&&!dd.n4){this.display=dd.getCssProp(this.div,"display","display","display");if(this.oimg){this.oimg.display=dd.getCssProp(this.oimg,"display","display","display");this.oimg.style.display="none"}b.display="none";dd.recalc()}else{b.visibility="hidden"}}this.visible=false;var a=this.children.length;while(a--){if(!(c=this.children[a]).detached){c.hide(d)}}};DDObj.prototype.show=function(c,b){if(this.div){b=this.css||this.div;if(b.display&&b.display=="none"){b.display=this.display||"block";if(this.oimg){this.oimg.style.display=this.oimg.display||"inline"}dd.recalc()}else{b.visibility="visible"}}this.visible=true;var a=this.children.length;while(a--){if(!(c=this.children[a]).detached){c.show()}}};DDObj.prototype.resizeTo=function(a,b,c){if(!this.div){return}if(a===false){a=this.w}if(b===false){b=this.h}if(isNaN(a)&&(a=="auto"||a.substr(a.length-1,1)=="%"||a.substr(a.length-2,2)=="em")){wPx=false}else{a=(this.w=dd.Int(a))-this.dw;wPx=true}if(isNaN(b)&&(b=="auto"||b.substr(b.length-1,1)=="%"||b.substr(b.length-2,2)=="em")){hPx=false}else{b=(this.h=dd.Int(b))-this.dh;hPx=true}if(dd.n4){this.div.resizeTo(a,b);if(this.is_image){this.write('<img src="'+this.src+'" width="'+a+'" height="'+b+'">');(this.nimg=this.div.D.images[0]).src=this.src}}else{if(wPx&&hPx&&typeof this.css.pixelWidth!=dd_u){this.css.pixelWidth=a;this.css.pixelHeight=b;if(this.is_image){(c=this.nimg.style).pixelWidth=a;c.pixelHeight=b}}else{this.css.width=a+((wPx)?dd.px:"");this.css.height=b+((hPx)?dd.px:"");if(this.is_image){(c=this.nimg).width=a;c.height=b;if(!c.complete){c.src=this.src}}}}};DDObj.prototype.resizeBy=function(b,d){var c=((b=="auto")?"auto":this.w+dd.Int(b));var a=((d=="auto")?"auto":this.h+dd.Int(d));this.resizeTo(c,a)};DDObj.prototype.setMinHeight=function(a){this.minh=a;if(this.h<a){this.resizeTo("auto",a)}};DDObj.prototype.setMaxHeight=function(a){this.maxh=a;if(this.h>a){this.resizeTo("auto",a)}};DDObj.prototype.setMinWidth=function(a){this.minw=a;if(this.w<a){this.resizeTo(a,"auto")}};DDObj.prototype.setMaxWidth=function(a){this.maxw=a;if(this.w>a){this.resizeTo(a,"auto")}};DDObj.prototype.setInertia=function(a){this.inertia=a};DDObj.prototype.freeze=function(){this.frozen=true};DDObj.prototype.warm=function(){this.frozen=false};DDObj.prototype.swapImage=function(c,b){if(!this.nimg){return}this.nimg.src=c;this.src=this.nimg.src;if(b){var a=this.copies.length;while(a--){this.copies[a].src=this.copies[a].nimg.src=this.nimg.src}}};DDObj.prototype.setBgColor=function(a){if(dd.n4&&this.div){this.div.bgColor=a}else{if(this.css){this.css.background=a}}this.bgColor=a};DDObj.prototype.write=function(b,a){this.text=b;if(!this.div){return}if(dd.n4){(a=this.div.document).open();a.write(b);a.close();dd.getWH(this)}else{this.css.height="auto";this.div.innerHTML=b;if(!dd.ie4){dd.recalc()}if(dd.ie4||dd.n6){setTimeout("dd.recalc();",0)}}};DDObj.prototype.copy=function(d,b,e){if(!this.oimg){return}e=(dd.ie&&D.all.tags("body"))?D.all.tags("body")[0]:D.getElementsByTagName?(D.getElementsByTagName("body")[0]||dd.db):dd.db;d=d||1;while(d--){var a=this.copies.length,c=new DDObj(this.name+this.cmd,a+1);if(dd.n4){c.id=(b=new Layer(c.w)).name;b.clip.height=c.h;b.visibility="show";(b=b.document).open();b.write(c.htm);b.close()}else{if(e&&e.insertAdjacentHTML){e.insertAdjacentHTML("AfterBegin",c.t_htm)}else{if(D.createElement&&e&&e.appendChild){e.appendChild(b=D.createElement("dIi15v"));b.innerHTML=c.htm;b.id=c.id;b.style.position="absolute";b.style.width=c.w+"px";b.style.height=c.h+"px"}else{if(e&&e.innerHTML){e.innerHTML+=c.t_htm}}}}c.defz=this.defz+1+a;dd.addProps(c);c.original=this;dd.addElt(c,this);if(this.parent){this.parent.addChild(c,this.detached);c.defparent=this.defparent}c.moveTo(c.defx=this.defx,c.defy=this.defy);if(dd.n4){c.defsrc=c.src=this.defsrc}c.swapImage(this.src)}};DDObj.prototype.addChild=function(b,c,a){if(typeof b!="object"){b=dd.elements[b]}if(b.parent&&b.parent==this||b==this||!b.is_image&&b.defparent&&!a){return}this.children[this.children.length]=this.children[b.name]=b;b.detached=c||0;if(a){b.defparent=this}else{if(this==b.defparent&&b.is_image){dd.getImg(this,b.oimg.name,1)}}if(!b.defparent||this!=b.defparent){b.defx=b.x;b.defy=b.y}if(!c){b.defz=b.defz+this.defz-(b.parent?b.parent.defz:0)+(!b.is_image*1);b.setZ(b.z+this.z-(b.parent?b.parent.z:0)+(!b.is_image*1),1)}if(b.parent){b.parent._removeChild(b,1)}b.parent=this};DDObj.prototype._removeChild=function(d,e){if(typeof d!="object"){d=this.children[d]}var c=this.children,a=new Array();for(var b=0;b<c.length;b++){if(c[b]!=d){a[a.length]=c[b]}}this.children=a;d.parent=null;if(!e){d.detached=d.defp=0;if(d.is_image){dd.getImg(d,d.oimg.name,1)}}};DDObj.prototype.attachChild=function(a){(a=(typeof a!="object")?this.children[a]:a).detached=0;a.setZ(a.defz+this.z-this.defz,1)};DDObj.prototype.detachChild=function(a){(a=(typeof a!="object")?this.children[a]:a).detached=1};DDObj.prototype.setZ=function(e,c,d){if(c){var a=e-this.z,b=this.children.length;while(b--){if(!(d=this.children[b]).detached){d.setZ(d.z+a,1)}}}dd.z=Math.max(dd.z,this.z=this.div?((this.css||this.div).zIndex=e):0);if(this.z>0){dd.zMin=Math.max(0,Math.min(dd.zMin,this.z))}};DDObj.prototype.maximizeZ=function(){this.setZ(dd.z+1,1)};DDObj.prototype.minimizeZ=function(){this.setZ(Math.max(0,dd.zMin-1),1)};DDObj.prototype._resetZ=function(b){if(this.re_z||dd.re_z){this.setZ(this.defz);var a=this.children.length;while(a--){if(!(b=this.children[a]).detached){b.setZ(b.defz)}}}};DDObj.prototype.setOpacity=function(a){this.opacity=a;this._setOpaRel(1,1)};DDObj.prototype._setOpaRel=function(e,b,d,c){if(this.css&&(this.diaphan||b)){d=this.opacity*e;if(typeof this.css.MozOpacity!=dd_u){this.css.MozOpacity=d}else{if(typeof this.css.filter!=dd_u){if(typeof this.div.style.opacity!=dd_u){this.div.style.opacity=d}else{this.css.filter="Alpha(opacity="+parseInt(100*d)+")"}}else{this.css.opacity=d}}var a=this.children.length;while(a--){if(!(c=this.children[a]).detached){c._setOpaRel(e,1)}}}};DDObj.prototype.setCursor=function(a){this._setCrs(this.cursor=(a.indexOf("c:")+1)?a.substring(2):a)};DDObj.prototype._setCrs=function(a){if(this.css){this.css.cursor=((!dd.ie||dd.iemac)&&a=="hand")?"pointer":a}};DDObj.prototype.setDraggable=function(a){this.nodrag=!a*1;this._setCrs(a?this.cursor:"auto")};DDObj.prototype.setResizable=function(a){this.resizable=a*1;if(a){this.scalable=0}};DDObj.prototype.setScalable=function(a){this.scalable=a*1;if(a){this.resizable=0}};DDObj.prototype.getEltBelow=function(f,e,d){var c,a=-1,b=dd.elements.length;while(b--){c=dd.elements[b];e=c.x-this.w/2-((c.scrollContainer)?c.scrollContainer.scrollLeft:0);d=c.y-this.h/2-((c.scrollContainer)?c.scrollContainer.scrollTop:0);if(c.visible&&c.z<this.z&&this.x>=e&&this.x<=e+c.w&&this.y>=d&&this.y<=d+c.h){if(c.z>a){if(c.scrollContainer&&(c.div.offsetTop-c.scrollContainer.scrollTop<0||c.div.offsetTop-c.scrollContainer.scrollTop>c.scrollContainer.offsetHeight)){}else{a=c.z;f=c;return f}}}}};DDObj.prototype.pickTime=function(){return wl.chrono.microtime()-this.pickDate};if(W.lFunc){lFunc("wz_dragdrop",25)}DDObj.prototype.receiverOnlyGetEltBelow=function(k,a){if(k==undefined||k){drec.computeRect()}if(a==undefined){a=1}var j;var e=0;var d;var c;var h;var n=new Array();var m;var l;var g;var f;for(i in drec.elements){var b=drec.elements[i];if(!b.rect){b.rect=actualRect(b)}g=b.rect.x-((b.scrollContainer)?b.scrollContainer.scrollLeft:0);f=b.rect.y-((b.scrollContainer)?b.scrollContainer.scrollTop:0);if(a){if(g<=mouseX&&g+b.rect.w>=mouseX&&f<=mouseY&&f+b.rect.h>=mouseY){n[n.length]=b}else{if(g<=this.x+this.w&&g+b.rect.w>=this.x&&f<=this.y+this.h&&f+b.rect.h>=this.y){n[n.length]=b}}}}for(i=n.length-1;i>=0;i--){if(i==0){return n[0]}else{for(c=i-1;c>=0;c--){if(isParent(n[i],n[c])){break}}if(c<0){return n[i]}}}return null};DDObj.prototype.del=function(a){var b;if(this.parent&&this.parent._removeChild){this.parent._removeChild(this)}if(this.original){this.hide();if(this.original.copies){d_os=new Array();for(b=0;b<this.original.copies.length;b++){if((d_o=this.original.copies[b])!=this){d_os[d_o.name]=d_os[d_os.length]=d_o}}this.original.copies=d_os}}else{if(this.is_image){this.hide();if(this.oimg){if(dd.n4){this.oimg.src=this.defsrc}else{this.oimg.style.visibility="visible"}}}else{if(this.moveTo){if(this.css){this.css.cursor="default"}this.moveTo(this.defx,this.defy);this.resizeTo(this.defw,this.defh)}}}d_os=new Array();for(b=0;b<dd.elements.length;b++){if((d_o=dd.elements[b])!=this){d_os[d_o.name]=d_os[d_o.index=d_os.length]=d_o}else{d_o._free()}}dd.elements=d_os;if(!dd.n4&&(a==undefined||a===false)){dd.recalc()}};DDObj.prototype.released=function(){if(this.releasedFunc){this.releasedFunc(this)}if(this.ephemeral){this.del(1)}};DDObj.prototype._free=function(){for(var a in this){this[a]=null}dd.elements[this.name]=null};dd.n4RectVis=function(b){for(var a=4;a--;){dd.rectI[a].visibility=dd.rectA[a].visibility=b?"show":"hide";if(b){dd.rectI[a].zIndex=dd.rectA[a].zIndex=dd.z+2}}};dd.n4RectPos=function(c,e,d,a,b){c.x=e;c.y=d;c.clip.width=a;c.clip.height=b};dd.n4Rect=function(a,c){var b;if(!dd.rectI){dd.rectI=new Array();dd.rectA=new Array()}if(!dd.rectI[0]){for(b=4;b--;){(dd.rectI[b]=new Layer(1)).bgColor="#000000";(dd.rectA[b]=new Layer(1)).bgColor="#ffffff"}}if(!dd.rectI[0].visibility||dd.rectI[0].visibility=="hide"){dd.n4RectVis(1)}dd.obj.w=a;dd.obj.h=c;for(b=4;b--;){dd.n4RectPos(dd.rectI[b],dd.obj.x+(!(b-1)?(dd.obj.w-1):0),dd.obj.y+(!(b-2)?(dd.obj.h-1):0),b&1||dd.obj.w,!(b&1)||dd.obj.h);dd.n4RectPos(dd.rectA[b],!(b-1)?dd.rectI[1].x+1:(dd.obj.x-1),!(b-2)?dd.rectI[2].y+1:(dd.obj.y-1),b&1||dd.obj.w+2,!(b&1)||dd.obj.h+2)}};dd.reszTo=function(a,b){if(dd.n4&&dd.obj.is_image){dd.n4Rect(a,b)}else{dd.obj.resizeTo(a,b)}};dd.embedVis=function(c){var f=new Array("iframe","applet","embed","object");var b=f.length;while(b--){var e=dd.ie?D.all.tags(f[b]):D.getElementsByTagName?D.getElementsByTagName(f[b]):null;if(e){var a=e.length;while(a--){var d=e[a];while(d.offsetParent||d.parentNode){if((d=d.parentNode||d.offsetParent||null)==dd.obj.div){e[a].style.visibility=c;break}}}}}};dd.maxOffX=function(b,a){return((dd.obj.maxoffl+1&&(a=dd.obj.defx-dd.obj.maxoffl)-b>0||dd.obj.maxoffr+1&&(a=dd.obj.defx+dd.obj.maxoffr)-b<0)?a:b)};dd.maxOffY=function(b,a){return((dd.obj.maxofft+1&&(a=dd.obj.defy-dd.obj.maxofft)-b>0||dd.obj.maxoffb+1&&(a=dd.obj.defy+dd.obj.maxoffb)-b<0)?a:b)};dd.inWndW=function(d,b){var a=dd.getScrollX(),c=dd.getWndW();return(((b=a+2)-d>0)||((b=a+c+dd.obj.w-2)-d<0)?b:d)};dd.inWndH=function(d,c){var b=dd.getScrollY(),a=dd.getWndH();return(((c=b+2)-d>0)||((c=b+a+dd.obj.h-2)-d<0)?c:d)};dd.limW=function(a){return((dd.obj.minw-a>0)?dd.obj.minw:(dd.obj.maxw>0&&dd.obj.maxw-a<0)?dd.obj.maxw:a)};dd.limH=function(a){return((dd.obj.minh-a>0)?dd.obj.minh:(dd.obj.maxh>0&&dd.obj.maxh-a<0)?dd.obj.maxh:a)};dd.rotVect=function(e){var d={},a=e.x+e.w/2,f=e.y+e.h/2,c=mouseX-a,b=mouseY-f;d.d=Math.sqrt(c*c+b*b);if(c==0){d.a=90;if(b>0){d.a=-90}}else{d.a=180*Math.atan(-b/c)/Math.PI;if(c<0){d.a+=180}if(d.a>180){d.a-=360}}return d};function DDScroll(){if(!dd.obj||!dd.obj.scroll&&!dd.scroll||dd.ie4||dd.whratio){dd.scrx=dd.scry=0;return}var e=28,d=dd.getScrollX(),b=dd.getScrollY();if(dd.msmoved){var f=dd.getWndW(),a=dd.getWndH(),c;dd.scrx=((c=dd.e.x-f-d+e)>0)?(c>>=2)*c:((c=d+e-dd.e.x)>0)?-(c>>=2)*c:0;dd.scry=((c=dd.e.y-a-b+e)>0)?(c>>=2)*c:((c=b+e-dd.e.y)>0)?-(c>>=2)*c:0}if(dd.scrx||dd.scry){W.scrollTo(d+(dd.scrx=dd.obj.is_resized?dd.limW(dd.obj.w+dd.scrx)-dd.obj.w:dd.obj.vertical?0:(dd.maxOffX(dd.obj.x+dd.scrx)-dd.obj.x)),b+(dd.scry=dd.obj.is_resized?dd.limH(dd.obj.h+dd.scry)-dd.obj.h:dd.obj.horizontal?0:(dd.maxOffY(dd.obj.y+dd.scry)-dd.obj.y)));dd.obj.is_dragged?dd.obj.moveTo(dd.obj.x+dd.getScrollX()-d,dd.obj.y+dd.getScrollY()-b):dd.reszTo(dd.obj.w+dd.getScrollX()-d,dd.obj.h+dd.getScrollY()-b)}dd.msmoved=0;W.setTimeout("DDScroll()",51)}function PICK_CANCEL(a){W.clearTimeout(dd.delayedPickTimeout);dd.delayedPickTimeout=0;dd.setUpHdl(dd.upFunc)}function PICK(f){var l,j,g,h=0,c,d;if(dd.disabled){return true}if(f=="resume"){if(!dd.delayedPickTimeout){return}W.clearTimeout(dd.delayedPickTimeout);dd.delayedPickTimeout=0;dd.e=dd.delayedPickEvt;h=1}else{updateMousePosition(f);dd.e=new dd.evt(f)}if(dd.e.x>=dd.getWndW()+dd.getScrollX()||dd.e.y>=dd.getWndH()+dd.getScrollY()){return true}var p,m,k,e=-1,b=dd.elements.length;if(d=dd.e.src){while(1){if(d.id&&(p=dd.elements[d.id])){break}if(!d.parentNode||d.parentNode===d){break}d=d.parentNode}}while(b--){m=dd.elements[b];if(p&&m!==p){continue}j=g=0;if(m.detachFromParent&&(!dd.op)){l=m.div.parentNode;while(l&&(!l.style||!l.style.overflow||l.style.overflow=="visible")){if(l==l.parentNode){break}l=l.parentNode}if(l){g=l.scrollTop;j=l.scrollLeft}}if(dd.n4&&dd.e.but>1&&dd.e.src==m.oimg&&!m.clone){return false}if(p||(m.visible&&dd.e.but<=1&&dd.e.x>=m.x-j&&dd.e.x<=m.x+m.w-j&&dd.e.y>=m.y-g&&dd.e.y<=m.y+m.h-g)){if(m.z>e&&(k=dd.e.src.tag).indexOf("inpu")<0&&k.indexOf("texta")<0&&k.indexOf("sele")<0&&k.indexOf("opti")<0&&k.indexOf("scrol")<0&&(!dgi("maskDiv")||dgi("maskDiv").style.zIndex*1<m.z)){e=m.z;if(!m.frozen){c=dd.obj=m;c.offsetX=j;c.offsetY=g}}}}if(c){if(c.pickDelay&&!h){dd.delayedPickEvt=new dd.evt(f);dd.setUpHdl(PICK_CANCEL);dd.delayedPickTimeout=W.setTimeout('PICK("resume")',c.pickDelay);c=dd.obj=null;return false}if(c.isWindow){win(c.name).select()}if(c.dragClass){$(c.div).e.className().add("dragged")}if(c.nodrag){c=dd.obj=null}else{c.mPickX=mouseX;c.mPickY=mouseY;if(c.rot){c.cPickX=c.x+c.w/2;c.cPickY=c.y+c.h/2;c.pickW=c.w;c.pickH=c.h;var t=c.div.style,a=(t.MozTransform||t.WebkitTransform||t.OTransform);c.lpa=c.angle=c.pickAngle=(a&&a.indexOf)?-1*(a.substring(a.indexOf("(")+1,a.indexOf("d"))):0;c.pickRotVect=dd.rotVect(c)}var q=(dd.e.modifKey||dd.e.ctrlKey)&&(c.resizable||c.scalable);if(dd.op){(m=dgi("OpBlUr")).style.pixelLeft=dd.e.x;m.style.pixelTop=dd.e.y;(m=m.children[0].children[0]).focus();m.blur()}else{if(dd.ie&&!dd.ie4){if(D.selection&&D.selection.empty){D.selection.empty()}dd.db.onselectstart=function(){event.returnValue=false}}}if(q||c.resizeIfPick||c.resizableOnly){if(!c.isWindow){if(c.minh==c.maxh){c._setCrs("e-resize")}else{if(c.minw==c.maxw){c._setCrs("s-resize")}else{c._setCrs("se-resize")}}}if(c.isWindow){if(dd.op){win(c.name).resizeMask()}dgi(c.name+"_mask").style.display="block"}c.is_resized=1;dd.whratio=c.scalable?c.defw/c.defh:0;if(dd.ie){if(dd.ie4){W.dd_x=dd.getScrollX();W.dd_y=dd.getScrollY()}setTimeout("if(dd.obj && D.selection && D.selection.empty){D.selection.empty();if(dd.ie4) W.scrollTo(W.dd_x, W.dd_y);}",0)}dd.setMovHdl(RESIZE);dd.reszTo(c.w,c.h)}else{c.is_dragged=1;if(c.isWindow){if(dd.op){dgi(c.name+"_mask").style.height=dgi(c.name+"_if").offsetHeight+" "}dgi(c.name+"_mask").style.display="block"}dd.setMovHdl(DRAG)}dd.setUpHdl(DROP);if(!c.isWindow){dd.embedVis("hidden")}c._setOpaRel(0.7);c.maximizeZ();dd.ofx=c.x+c.w-dd.e.x;dd.ofy=c.y+c.h-dd.e.y;c.pickMouseX=mouseX;c.pickMouseY=mouseY;c.pickX=c.lpx=c.x;c.pickY=c.lpy=c.y;c.lpdx=0;c.lpdy=0;c.lpdt=0;c.pickDate=c.lpDate=(new Date()).getTime();my_PickFunc();if(c.pickFunc){c.pickFunc()}DDScroll();return !(c.is_resized||dd.n4&&c.is_image||dd.n6||dd.w3c)}}if(dd.downFunc){return dd.downFunc(f)}return true}function DRAG(d_ev){var o=dd.obj;if(dd.disabled){return true}updateMousePosition(d_ev);if(!o||!o.visible){return true}o.resizeIfPick=false;if(dd.ie4||dd.w3c||dd.n6||o.children.length>15){if(dd.wait){return false}dd.wait=1;setTimeout("dd.wait = 0;",dd.tiv)}dd.e=new dd.evt(d_ev);if(dd.ie&&!dd.e.but){DROP(d_ev);return true}dd.msmoved=1;if(o.isWindow||o.isIcon){var p=dd.getPadding(),nx=Math.max(p.left,dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-o.w)),ny=Math.max(p.top,dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-o.h));if(W.winLimitArea!==0){nx=Math.min(nx,dd.getWndW()-o.w-p.right);ny=Math.min(ny,dd.getWndH()-o.h-p.bottom)}o.moveTo(o.vertical?o.x:nx,o.horizontal?o.y:ny)}else{if(o.rot&&o.pickRotVect.d>o.w/4){var nV=dd.rotVect(o),a=Math.PI*(nV.a+180)/180,d=o.pickRotVect.d;o.moveTo(mouseX+d*Math.cos(a)-o.w/2,mouseY-d*Math.sin(a)-o.h/2);o.rotTo(o.pickAngle+nV.a-o.pickRotVect.a)}else{if(o.detachFromParent){o.moveTo(-o.offsetX+(o.detachOffsetX?o.detachOffsetX:0)+(o.vertical?o.x:dd.ofx+dd.e.x-o.w),-o.offsetY+(o.detachOffsetY?o.detachOffsetY:0)+(o.horizontal?o.y:dd.ofy+dd.e.y-o.h))}else{o.moveTo(-o.offsetX+(o.detachOffsetX?o.detachOffsetX:0)+(o.vertical?o.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-o.w)),-o.offsetY+(o.detachOffsetY?o.detachOffsetY:0)+(o.horizontal?o.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-o.h)))}}}if(o.maxXPos&&o.x>o.maxXPos){o.moveTo(o.maxXPos,false)}if(o.minXPos&&o.x<o.minXPos){o.moveTo(o.minXPos,false)}if(o.mayYPos&&o.y>o.mayYPos){o.moveTo(o.mayYPos,false)}if(o.minYPos&&o.y<o.minYPos){o.moveTo(o.minYPos,false)}my_DragFunc();if(o.dragFunc){if(typeof o.dragFunc=="string"){eval(o.dragFunc+"()")}else{o.dragFunc()}}return MOUSE_MOVED(d_ev)}function RESIZE(d){var b=dd.obj;updateMousePosition(d);if(!b||!b.visible){return true}if(dd.wait){return false}dd.wait=1;setTimeout("dd.wait = 0;",dd.tiv);dd.e=new dd.evt(d);if(dd.ie&&!dd.e.but){DROP(d);return true}dd.msmoved=1;if(b.isWindow){var a=dd.getPadding();var g,c;var j=b.w;var e=b.h;if(b.resizeDir=="l"||b.resizeDir=="tl"||b.resizeDir=="bl"){if((g=dd.limW(2*dd.ofx-(dd.inWndW(dd.ofx+dd.e.x)-b.x)))!=j){if(dd.e.x<a.left){g-=a.left-dd.e.x;dd.e.x=a.left}if(dd.e.y<a.top){c-=a.top-dd.e.y;dd.e.y=a.top}b.moveTo(dd.e.x,b.y);dd.ofx=b.x+g-dd.e.x}}else{if(b.resizeDir=="r"||b.resizeDir=="tr"||b.resizeDir=="br"){g=dd.limW(dd.inWndW(dd.ofx+dd.e.x)-b.x)}else{var g=b.w}}if(b.resizeDir=="tl"||b.resizeDir=="t"||b.resizeDir=="tr"){if((c=dd.limH(2*dd.ofy-(dd.inWndH(dd.ofy+dd.e.y)-b.y)))!=e){b.moveTo(b.x,dd.e.y);dd.ofy=b.y+c-dd.e.y}}else{if(b.resizeDir=="br"||b.resizeDir=="b"||b.resizeDir=="bl"){c=dd.limH(dd.inWndH(dd.ofy+dd.e.y)-b.y)}else{c=b.h}}g=Math.min(g,dd.getWndW()-a.right-b.x);c=Math.min(c,dd.getWndH()-a.bottom-b.y);if(g<=0){g=false}if(c<=0){c=false}}else{if(b.rot){var h,k=dd.rotVect(b);h=k.d/b.pickRotVect.d;b.resizeTo(h*b.pickW,h*b.pickH);b.moveTo(b.pickX-(b.w-b.pickW)/2,b.pickY-(b.h-b.pickH)/2);b.rotTo(b.pickAngle+k.a-b.pickRotVect.a)}else{var g=dd.limW(dd.inWndW(dd.ofx+dd.e.x)-b.x),c;if(!dd.whratio){c=dd.limH(dd.inWndH(dd.ofy+dd.e.y)-b.y)}else{c=dd.limH(dd.inWndH(Math.round(g/dd.whratio)+b.y)-b.y);g=Math.round(c*dd.whratio)}}}if(!b.rot){dd.reszTo(g,c)}if(W.my_ResizeFunc){my_ResizeFunc()}if(b.resizeFunc){b.resizeFunc()}return MOUSE_MOVED(d)}if(W.lFunc){lFunc("wz_dragdrop",25)}function DROP(a){if(dd.disabled){return true}if(a){dd.e=new dd.evt(a);updateMousePosition(a)}var b=dd.obj;if(b){b.dragTime=(new Date()).getTime()-b.pickDate;b.mDropX=mouseX;b.mDropY=mouseY;b.mdx=b.mDropX-b.mPickX;b.mdy=b.mDropY-b.mPickY;if(b.is_dragged){if(!b.is_image){dd.getWH(b)}}else{if(dd.n4){if(b.is_image){dd.n4RectVis(0);b.resizeTo(b.w,b.h)}}}dd.setMovHdl(MOUSE_MOVED);dd.setUpHdl(dd.upFunc);if(dd.db){dd.db.onselectstart=null}b._setOpaRel(1);b._setCrs(b.cursor);if(!b.isWindow){dd.embedVis("visible")}b._resetZ();if(a){dd.e=new dd.evt(a)}my_DropFunc();if(b.dropFunc){b.dropFunc()}dd.msmoved=b.is_dragged=b.is_resized=dd.whratio=0;dd.obj=null}dd.setDwnHdl(PICK)}function KDOWN(a){updateMousePosition(a);if(dragInProgress&&dd.obj&&dd.obj.ctrlPlus){my_DragFunc()}if(dd.kDwnFunc){return dd.kDwnFunc(a)}}function KUP(a){updateMousePosition(a);if(dragInProgress&&dd.obj&&dd.obj.ctrlPlus){my_DragFunc()}if(dd.kUpFunc){return dd.kUpFunc(a)}}function MOUSE_MOVED(a){if(dd.disabled){return true}updateMousePosition(a);if(dd.delayedPickTimeout){if(Math.abs(dd.delayedPickEvt.x-mouseX)+Math.abs(dd.delayedPickEvt.y-mouseY)>2){return PICK("resume")}}if(dd.moveFunc){return dd.moveFunc(a)}else{return bBrowser=="iPhone"}}function SET_DHTML(){dd.moveFunc=D.onmousemove;D.onmousemove=MOUSE_MOVED;D.ontouchmove=MOUSE_MOVED;var a=arguments,c,g="",f,d=a.length;while(d--){if(!(c=a[d]).indexOf("c:")){dd.cursor=c.substring(2)}else{if(c==NO_ALT){dd.noalt=1}else{if(c==SCROLL){dd.scroll=1}else{if(c==RESET_Z){dd.re_z=1}else{if(c==RESIZABLE){dd.resizable=1}else{if(c==SCALABLE){dd.scalable=1}else{if(c==TRANSPARENT){dd.diaphan=1}else{f=new DDObj(c);dd.addElt(f);g+=f.t_htm||"";if(f.oimg&&f.cpy_n){var b=0;while(b<f.cpy_n){var e=new DDObj(f.name+f.cmd,++b);dd.addElt(e,f);e.defz=f.defz+b;e.original=f;g+=e.t_htm}}}}}}}}}}if(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c){D.write((dd.n4?'<div style="position:absolute;"></div>\n':(dd.op&&!dd.op6)?'<div id="OpBlUr" style="position:absolute;visibility:hidden;width:0px;height:0px;"><form><input type="text" style="width:0px;height:0px"></form></div>':"")+g)}dd.zMin=dd.z=100;d=dd.elements.length;while(d--){dd.addProps(f=dd.elements[d]);if(f.is_image&&!f.original&&!f.clone){dd.n4?f.oimg.src=spacer:f.oimg.style.visibility="hidden"}}dd.mkWzDom();if(W.onload){dd.loadFunc=W.onload}if(W.onunload){dd.uloadFunc=W.onunload}W.onload=dd.initz;W.onunload=dd.finlz;dd.setDwnHdl(PICK);dd.setKDwnHdl(KDOWN);dd.setKUpHdl(KUP);if(!W.isMainFrame&&W.phpBrowser=="gecko"){if(D.body.onmouseout){bodyOnMouseout=D.body.onmouseout}D.body.onmouseout=my_bodyOut}}function ADD_DHTML(b,a){b=new DDObj(b);dd.addElt(b);dd.addProps(b);if(!a){dd.mkWzDom()}}dd.d=document;var RESET_ZINDEX=RESET_Z;var KEYDOWN_RESIZE=RESIZABLE;var CURSOR_POINTER=CURSOR_HAND;var NO_SCROLL="";function my_PickFunc(){var o=dd.obj;if(winInertiaTimeout){W.clearTimeout(winInertiaTimeout)}winInertiaTimeout=false;if(tooltipShown){tooltipDestroy()}dragInProgress=true;if(o.detachFromParent){var node=o.div;var tmpDragNode=node.cloneNode(true);tmpDragNode.setAttribute("id","tmpDragNode");tmpDragNode.style.visibility="hidden";node.parentNode.insertBefore(tmpDragNode,node);if(!dgi("dragDetach")){var ddNode=D.createElement("div");ddNode.id="dragDetach";ddNode.style.position="absolute";ddNode.style.top=0;ddNode.style.left=0;ddNode.style.zIndex=10000;D.body.appendChild(ddNode)}dgi("dragDetach").appendChild(node);dd.recalcItem(o.name)}if(W.preDrag){if(!preDrag()){return}}if(o.isWindow){winPicked()}for(var i=0;i<o.div.attributes.length;i++){if(o.div.attributes[i].name.toLowerCase()=="onpick"){eval(o.div.attributes[i].value)}}dragCancelOnclick=false;if(o.detachFromParent){o.moveTo(o.detachOffsetX+(o.vertical?o.x:dd.ofx+dd.e.x-o.w)-o.offsetX,o.detachOffsetY+(o.horizontal?o.y:dd.ofy+dd.e.y-o.h)-o.offsetY)}else{o.moveTo(o.detachOffsetX+(o.vertical?o.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-o.w))-o.offsetX,o.detachOffsetY+(o.horizontal?o.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-o.h))-o.offsetY)}drec.computeRect()}function my_DragFunc(y){var A=(new Date()).getTime(),v=3,c=0,h=W.winPadding;var m=dd.obj;if(!y){m.lpdx=m.x-m.lpx;m.lpdy=m.y-m.lpy;m.lpda=m.angle-m.lpa;m.lpx=m.x;m.lpy=m.y;m.lpa=m.angle;if(A>m.lpDate){m.lpdt=A-m.lpDate}m.lpDate=A;if(mouseEvt.e.ctrlKey&&m.ctrlPlus){if(!dd.elements.ctrlPlusItem){var d=D.createElement("div");d.id="ctrlPlusItem";d.style.position="absolute";d.innerHTML='<img alt="" src="/gfx/plus.gif">';D.body.appendChild(d);ADD_DHTML("ctrlPlusItem")}dd.elements.ctrlPlusItem.show();dd.elements.ctrlPlusItem.moveTo(m.x-12,m.y-12)}else{if(m.ctrlPlus&&dd.elements.ctrlPlusItem){dd.elements.ctrlPlusItem.hide()}}}else{var x;if(dd.elements[y]==null){return}x=W.dragNLaunchFriction||0.005;prevObj=m;m=dd.obj=dd.elements[y];if(!m.isLaunched&&(m.noLaunch||dd.noLaunch)){return}m.isLaunched=1;if(m.lpdt==0){m.lpdt=1;m.lpdx=0;m.lpdy=0}var w=0;if(m.maxoffl!=-1){w=Math.max(0,m.defx-m.maxoffl)}var t=(W.winMe)?winMe.getInnerWidth():D.body.scrollWidth;if(m.maxoffr!=-1){t=m.defx+m.maxoffr+m.w}var s=0;if(m.maxofft!=-1){s=Math.max(0,m.defy-m.maxofft)}var q=(W.winMe)?winMe.getInnerHeight():D.body.scrollHeight;if(m.maxoffb!=-1){q=m.defy+m.maxoffb}if(h){w+=h.left;t-=h.right;s+=h.top;q-=h.bottom}m.lpdy+=c*m.lpdt;var l=(m.lpdx/m.lpdt);var k=(m.lpdy/m.lpdt);var a=(m.lpda/m.lpdt);var j=A-m.lpDate;m.lpDate+=j;var g=Math.exp(-1*x*j);m.lpdx*=g;m.lpdy*=g;m.lpda*=g;var f=l*(1-g)/x;var e=k*(1-g)/x+c*j;var u=m.lpx+f;var r=m.lpy+e;var n=1;if(m.bounce&&(u<w||u+m.w>t)){if(u<w){n=(w-m.lpx)/f}else{n=(t-m.lpx-m.w)/f}n=(n+(1-n)/v);f*=n;e*=n;if(u<w){u=2*w-(m.lpx+f)}else{u=u=2*t-(m.lpx+f)-2*m.w}r=m.lpy+e;m.lpdx=-m.lpdx/v;m.lpdy=m.lpdy/v;if(m.rot){m.lpda+=m.lpdy}}if(m.bounce&&(r<s||r+m.h>q)){if(r<s){n=(s-m.lpy)/e}else{n=(q-m.lpy-m.h)/e}n=(n+(1-n)/v);e*=n;f*=n;if(r<s){r=2*s-(m.lpy+e)}else{r=r=2*q-(m.lpy+e)-2*m.h}u=m.lpx+f;m.lpdy=-m.lpdy/v;m.lpdx=m.lpdx/v;if(m.rot){m.lpda-=m.lpdx}}m.lpx=u;m.lpy=r;m.moveTo(u,r);if(m.rot&&m.lpda){m.rotBy(m.lpda)}dd.elements[y]=m}if(W.duringDrag){duringDrag()}if(wl){wl.autoScrollDivs.check()}if(m.notDroppable){return}var p=null,z;if(!(z=m.receiverOnlyGetEltBelow(0,1))){p=m.getEltBelow()}if(cDT!=null&&cDT!=p){if(cDT.transparentReceiver){cDT.setOpacity(1)}else{cDT.div.className="dropTarget"}cDT=null}if(drec.currentTarget!=null&&drec.currentTarget!=z){drec.unhighlight()}if(p!=null&&p.receiver&&!cDT&&m!=p){cDT=p;if(cDT.transparentReceiver){cDT.setOpacity(0.5)}else{cDT.div.className="dropTargetOver"}}if(z!=null&&z!=drec.currentTarget){drec.highlight(z)}if(y){m.dragTime=(new Date()).getTime()-m.pickDate;if(Math.abs(l)<0.03&&Math.abs(k)<0.03){m.isLaunched=0}var a=m.lpda;if(isNaN(a)){a=0}m=dd.obj=prevObj;if(Math.abs(l)<0.03&&Math.abs(k)<0.03&&Math.abs(a)<1){my_DropFunc(y)}else{winInertiaTimeout=W.setTimeout('my_DragFunc("'+y+'")',20)}}}function my_ResizeFunc(){var a=dd.obj;resizeInProgress=true;if(a.isWindow){if(a.w>dd.getWndW()||a.h>dd.getWndH()){a.resizeTo(Math.min(a.w>dd.getWndW()),Math.min(a.h>dd.getWndH()))}if(a.x<0||a.y<0){a.moveTo(Math.max(0,a.x),Math.max(0,a.y))}win(a.name).resizeMask()}}function my_ResizedFunc(){if(W.resizeComplete){resizeComplete()}}function my_DropFunc(launchedItem){var o=dd.obj;if(dd.elements.ctrlPlusItem){dd.elements.ctrlPlusItem.hide()}drec.unhighlight();if(!o||o.inertia){if(!launchedItem){var dt=((new Date()).getTime()-o.lpDate);if(dt<((W.dragNLaunchThreshold!=undefined)?dragNLaunchThreshold:100)&&o.lpdt>0){dragCancelOnclick=true;my_DragFunc(o.index);return}}else{prevObj=dd.obj;o=dd.obj=dd.elements[launchedItem];dragCancelOnclick=false}}if(o.detachFromParent){dgi("tmpDragNode").parentNode.insertBefore(o.div,dgi("tmpDragNode"));dgi("tmpDragNode").parentNode.removeChild(dgi("tmpDragNode"));dd.recalcItem();o.moveTo(o.vertical?o.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-o.w),o.horizontal?o.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-o.h))}dragInProgress=false;if(resizeInProgress){my_ResizedFunc()}resizeInProgress=false;var DTClass;if(o.dragTime>dragMinTimeForPreDrop&&W.preDrop){preDrop()}if(o.div.onmouseout){o.div.onmouseout()}if(o.dragClass){$(o.div).e.className().remove("dragged")}if(Math.pow(o.x-o.defx,2)+Math.pow(o.y-o.defy,2)>0){for(i=0;i<o.div.attributes.length;i++){if(o.div.attributes[i].name.toLowerCase()=="ondrop"){eval(o.div.attributes[i].value)}}}if(o.isWindow){winDropped()}if(o.isIcon){iconDropped()}var dropTarget=null,receiverOnlyTarget=null;if(W.dropFunction&&!o.notDroppable){if(!(receiverOnlyTarget=o.receiverOnlyGetEltBelow())){dropTarget=o.getEltBelow()}}var d2;if(o.inertia){d2=Math.pow(o.x-o.pickX,2)+Math.pow(o.y-o.pickY,2)}else{d2=Math.pow(o.mdx,2)+Math.pow(o.mdy,2)}if(W.dropFunction!=false&&!o.notDroppable&&o.dragTime>300&&d2>20){if(dropTarget&&dropTarget.receiver){if(o.name.substr(0,1)=="_"){eval('W.dropFunction("'+o.name.substr(1)+'", "'+dropTarget.name+'");')}else{eval('W.dropFunction("'+o.name+'", "'+dropTarget.name+'");')}}else{if(cDT&&cDT.receiver){if(o.name.substr(0,1)=="_"){eval('W.dropFunction("'+o.name.substr(1)+'", "'+cDT.name+'");')}else{eval('W.dropFunction("'+o.name+'", "'+cDT.name+'");')}}else{if(receiverOnlyTarget&&receiverOnlyTarget.id){if(o.name.substr(0,1)=="_"){eval('W.dropFunction("'+o.name.substr(1)+'", "'+receiverOnlyTarget.id+'");')}else{eval('W.dropFunction("'+o.name+'", "'+receiverOnlyTarget.id+'");')}}}}}var srcObj;if(o.is_image){srcObj=D.getElementsByName(o.name)[0]}else{srcObj=dgi(o.name)}if((d2<65&&(o.dragTime<350))||(o.dragTime<100)){dd.dragClick=1;dragCancelOnclick=0;if(srcObj&&srcObj.attributes.onclick){eval(srcObj.attributes.onclick.nodeValue)}dd.dragClick=0}else{if(!o.is_image&&srcObj&&srcObj.attributes.onclick){dragCancelOnclick=true}}if(cDT!=null){if(cDT.transparentReceiver){cDT.setOpacity(1)}else{cDT.div.className="dropTarget"}cDT=null}if(o.elastic||o.elasticTmp){o.elasticTmp=0;if(!o.noAnim&&!o.cancelAnim){dd.elasticAnim(o.name)}else{if(o.cancelAnim){o.cancelAnim=0}o.moveTo(o.defx,o.defy);dd.recalcItem();o.released()}}else{o.defx=o.x;o.defy=o.y;dd.recalcItem();o.released()}if(o.dropFuncInertia){o.dropFuncInertia()}if(launchedItem){dd.obj=prevObj}}function my_DragClearAllItems(){while(dd.elements.length>0){dd.elements[0].del(true)}dd.recalc()}function my_winResize(){if(W.bodyResized){bodyResized()}}function updateMousePosition(c){var b,a;mouseEvt=new dd.evt(c);if(mouseEvt.x||mouseEvt.y){a=wl.chrono.microtime();if(mousePosT!=undefined){if(b=(a-mousePosT)){mouseVX=1000*(mouseEvt.x-mouseX)/b;mouseVY=1000*(mouseEvt.y-mouseY)/b}}else{mouseVX=mouseVY=0}mousePosT=a;mouseX=mouseEvt.x;mouseY=mouseEvt.y}}function monitorMousePosition(){D.onmousemove=updateMousePosition}var bodyOnMouseout=0;function my_bodyOut(){}if(W.lFunc){lFunc("wz_dragdrop",25)};